<template>
  <div class="child">
    <h2>
      我父亲给我的车: <input type="text" :value="car" @input="handlerInput" />
    </h2>
  </div>
</template>

<script>
export default {
  name: "Child",
  props: ["car", "updatedCar"],
  methods: {
    handlerInput(event) {
      this.updatedCar(event.target.value);
    },
  },
};
</script>

<style scoped>
.child {
  background-color: skyblue;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px;
}
input {
  height: 30px;
  font-size: 18px;
}
</style>